package com.fix.demo.day4;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


public class MyTask1 {
	
	SimpleDateFormat sdf= new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	
	@Scheduled(cron="8,24,58 * * * * ? ")
	public void work() {
		System.out.println("执行自己的任务"+ sdf.format(new Date()));
	}

}
